#!/usr/bin/env python
# encoding: utf-8
#
# kdogs - Kick dogs, a lightweight watchdog kicker
#
# Copyright (C) 2007 Instituto Nokia de Tecnologia
#
# Author: Osvaldo Santana Neto <osvaldo.neto@openbossa.org>
#         Abner Silva <abner.silva@openbossa.org>
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation version 2 of the License.
#
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public License along
#  with this program; if not, write to the Free Software Foundation, Inc.,
#  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#

APPNAME = "kdogs"
VERSION = "0.1"

srcdir = "."
blddir = "build"

def set_options(opt):
    opt.tool_options('compiler_cc')

def configure(conf):
    conf.check_tool('compiler_cc')

    # select default env (already exist)
    conf.setenv('default')
    conf.define('VERSION', VERSION)
    conf.env['CCDEFINES'] += ['HAVE_CONFIG_H']
    conf.env['CCFLAGS'] = '-O2 -Wall'
    conf.write_config_header('config.h', conf.env)

    # create new env (debug)
    env = conf.env.copy()
    env.set_variant('debug')
    conf.set_env_name('debug', env)

    # select new env (debug)
    conf.setenv('debug')
    conf.define('TEST', 1)
    conf.env['CCFLAGS'] = '-O0 -g3 -Wall'
    conf.write_config_header('config.h', env)


def build(bld):
    bld.add_subdirs('src')
    bld.add_subdirs('test')

# vim:syntax=python:ts=4:sw=4:tw=0:et:si:ai:sm
